Skip to content

Say whether the segment seed survived, instead of that nothing can promise - #416

Open
SDL-A1 wants to merge 1 commit into
mainfrom
segbuild/seed-verdict-from-sweep-log
Open

SDL-A1 wants to merge 1 commit into
mainfrom
segbuild/seed-verdict-from-sweep-log

Conversation

@SDL-A1

@SDL-A1 SDL-A1 commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

On start, when the segment set ends below the executed head, segbuild warned that the seed state "is the one part nothing can promise — it was written below the watermark and was not pinned while the node ran". It said that unconditionally, including when the store's own records settle the question.

They usually do. A sweep preserves everything reachable from the root it collected against, so a state at or after that root's height is complete by construction: each of its nodes was either reachable then and preserved, or written since, into an epoch the sweep never touched. The sweep log records exactly that height.

So the message now reads the log and gives one of three verdicts:

case verdict
no sweep has ever completed nothing was collected; seed intact
newest sweep collected at or below the set's end seed is that state carried forward; intact
newest sweep was above it cannot be shown safe — the only case that still warns

On the mainnet node the second applies: the one sweep on record collected against #9,417,643 while the set ends at #9,429,888. So the operator now sees an info line saying the seed is intact, rather than a warning.

Why this is worth a change rather than a shrug

The old wording cost an investigation on 2026-11-24. It reads as a report of a near miss, so it prompts a hunt for collected nodes — and in that hunt I misread the epoch metadata filename and concluded, wrongly, that the collector was permanently disabled (see the note on #292). The collector had in fact preserved the exact state the build needs.

A message that says "unknowable" where the answer is recorded on disk is worse than no message: it spends the reader's attention and points it the wrong way.

No behaviour changes; this is reporting only.

🤖 Generated with Claude Code

…omise

On start, when the segment set ends below the executed head, segbuild warned
that the seed state "is the one part nothing can promise -- it was written
below the watermark and was not pinned while the node ran". It said that
unconditionally, including when the store's own records settle the question.

They usually do. A sweep preserves everything reachable from the root it
collected against, so a state at or after that root's height is complete by
construction: each of its nodes was either reachable then, and preserved, or
written since, into an epoch the sweep never touched. The sweep log records
exactly that height.

So the message now reads the log and distinguishes three cases: no sweep has
ever completed, so nothing was collected and the seed is intact; the newest
sweep collected at or below the set's end, so the seed is that state carried
forward and is intact; or the newest sweep was above it, which is the only case
that cannot be shown safe and is the only one that now warns.

On this node the first two apply -- the one sweep on record collected against
#9,417,643 while the set ends at #9,429,888 -- so an operator sees an info line
saying the seed is intact rather than a warning sending them to look for damage
that is not there.

Worth being precise about why that matters: the old wording cost an
investigation. It reads as a report of a near miss, and prompts a search for
collected nodes, when the collector had in fact preserved the exact state the
build needs. A message that says "unknowable" where the answer is recorded is
worse than no message.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants